//
//  YYMusicDeatailModel.swift
//  STMusic
//
//  Created by stoneobs on 17/4/18.
//  Copyright © 2017年 stoneobs. All rights reserved.
//
//**********************音乐详情模型***************************
import UIKit
//MARK:详细模型
class YYMusicDeatailModel: NSObject {

     var works:YYmusicModel? = YYmusicModel();
    
     var user:YYuserModel? = YYuserModel();
    
    var share_url:String? = "" //分享url
    
     var tags:Array<Dictionary<String,Any>>? = [];//[id:1,topic_id:2,value:"现场"];
    
    
    var comment:YYCommentListModel? = YYCommentListModel();
    
    var question:YYQuestionListModel? = YYQuestionListModel();
    
    var recommend:YYRecommendListModel? = YYRecommendListModel();
    
    var works_score:[String:Any]? = [:];//{"is_scored":"","score_member":"","avg_score":""}
}
//MARK:问答模型
class YYQuestionListModel: NSObject {
    
    var title:String? = "问答";
    
    var key:NSNumber? = 1;
    
    var data:Array<Dictionary<String,Any>>? = [];
    
    
}
//MARK:评论数组模型
class YYCommentListModel: NSObject {
    
    var title:String? = "社区评论";
    
    var key:NSNumber? = 4;
    
    var data:Array<Dictionary<String,Any>>? = []{
    
        didSet{
            //计算commentList
            for dic  in self.data!{
                let model = YYCommentModel.mj_object(withKeyValues: dic);
                commentList.append(model!);
                
            }
        
        }
    };
    
    var total:NSNumber! = 222;
    
    
    //计算属性 ，评论数组
    var commentList:Array<YYCommentModel> = [];
    
    
    
}
//MARK:每一条评论模型
class YYCommentModel: NSObject {
    
    var create_time:String? = "";
    var id:NSNumber? = 0
    var is_like:NSNumber? = 0
    var like_num:NSNumber? = 0
    var score:NSNumber? = 0
    var type:NSNumber? = 0
    var user:YYuserModel? = YYuserModel();
    var words:String? = ""; //内容
    
    var origin_comment:YYCommentOriginModel? = YYCommentOriginModel();
    

}
//MARK:每一条原始评论模型
class YYCommentOriginModel: NSObject {
    
    var create_time:String? = "";
    var id:NSNumber? = 0
    var play_time:NSNumber? = 0
    var status:NSNumber? = 0
    var type:NSNumber? = 0
    var user:YYuserModel? = YYuserModel();
    var user_id:NSNumber? = 0; //
    var words:String? = "";
    var works_id:NSNumber? = 0; //
    
    
    
}
//MARK:乐评数组模型
class YYRecommendListModel: NSObject {
    
    var title:String? = "乐评";
    
    var key:NSNumber? = 2;
    
    var data:Array<Dictionary<String,Any>>? = []{
        
        didSet{
            //计算commentList
            for dic  in self.data!{
                let model = YYRecommendModel.mj_object(withKeyValues: dic);
                recommentList.append(model!);
                
            }
            
        }
    };
    
    var total:NSNumber = 222;
    
    
    //计算属性 ，评论数组
    var recommentList:Array<YYRecommendModel> = [];
    
    
}
//MARK:每一条乐评模型
class YYRecommendModel: NSObject {
    
    var user:YYuserModel?
    
    var file:YYRecommendFileModel?;
    
    
}
//MARK:乐评中的file模型
class YYRecommendFileModel: NSObject {
    
    var id:String? = "";
    
    var create_time:String? = "";
    
    var audio_long:String? = "";//音频时长

    var mood:String? = "";
    
    var listen_num:String? = "";
    

    var like_num:NSNumber? = 2;
    
    var is_like:NSNumber? = 2;
   
    
    //请求后的url
    var voiceUrl:String?
    //判断是否显示的时候开启动画
    var isPlaying:Bool! = false;
    
    

    
}
